package com.jctrip.hotel.management.model.result;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@ApiModel(value = "供应列表信息-返回值")
@Data
@Builder
public class GetAllSourceListResult {
    @ApiModelProperty(value = "供应列表")
    private List<SourceInfo> records;

    @ApiModelProperty(value = "供应总数")
    private Long total;

    @ApiModelProperty(value = "当前页码")
    private Long current;

    @ApiModelProperty(value = "当前页面大小")
    private Long size;

    @ApiModelProperty(value = "共几页")
    private Long pages;

    @ApiModel(value = "供应对象")
    @Data
    @Builder
    public static class SourceInfo{
        @ApiModelProperty(value = "主键id")
        private String id;

        @ApiModelProperty(value = "供应商编号")
        private String sourceCode;

        @ApiModelProperty(value = "供应商接口")
        private String type;

        @ApiModelProperty(value = "供应商名称")
        private String name;

        @ApiModelProperty(value = "供应商账户id")
        private String sourceId;

        @ApiModelProperty(value = "供应商账户应用id")
        private String appId;

        @ApiModelProperty(value = "供应商账户秘钥")
        private String secretKey;

        @ApiModelProperty(value = "供应商状态(0=关闭；1=正常)")
        private Integer status;

        @ApiModelProperty(value = "折扣率(0.85=85折)")
        private BigDecimal discountRate;

        @ApiModelProperty(value = "早餐数量")
        private Integer breakfastCount;

        @ApiModelProperty(value = "拓展信息(JSON格式)")
        private String extra;
    }
}
